#include <bits/stdc++.h>
using namespace std;
using uint=unsigned int;
using ll=long long;
using ull=unsigned long long;
using i128=__int128;
const int N=1e6+5;

void solve(){
    
    return;
}

int main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    int n, p;
    cin >> n >> p;
    vector<int> a(n), b(n);
    double suma = 0;
    for (int i = 0; i < n; ++i) {
        cin >> a[i] >> b[i];
        suma += a[i];
    }
    if (suma <= p) {
        cout << -1 << endl;
        return 0;
    }
    double l = 0, r = 1e18;
    for (int iter = 0; iter < 100; ++iter) {
        double mid = (l + r) / 2;
        double total = 0;
        for (int i = 0; i < n; ++i) {
            double need = a[i] * mid - b[i];
            if (need > 0) total += need;
        }
        if (total <= p * mid) {
            l = mid;
        } else {
            r = mid;
        }
    }
    // double l = 0, r = 1e18;
    // while (r - l > 1e-10) {
    //     double mid = (l + r) / 2;
    //     bool flag = true;
    //     for (int i = 0; i < n; i++) {
    //         if (b[i] < mid * a[i] - mid * p) {
    //             flag = false;
    //             break;
    //         }
    //     }
    //     if (flag) {
    //         l = mid;
    //     } else {
    //         r = mid;
    //     }
    // }
    cout << fixed << setprecision(10) << l << endl;

    return 0;
}